import http from "@/http/index"

export default {

    select: {
        name: '详情信息',
        url: '/api/eduInfo',
        //异步封装，异步处理
        //async 异步操作 与 await异步接受 配合使用
        call: async function (params:  any = {}) {
            return await http.get(this.url, params) 
        }
        //相当于
        //select.call({pagenum,pageSize}) async.then((res)=>{await})
        //select.call() .then((res)=>{})
    },
    insert: {
        name: '添加信息',
        url: '/api/eduInfo',
        call: async function (params: any = {}) {
            return await http.post(this.url, params)
        }
    },
    update: {
        name: '修改信息',
        url: '/api/eduInfo',
        call: async function (params: any = {}) {
            return await http.put(this.url, params)
        }
    },
    delete: {
        name: '删除信息',
        url: '/api/eduInfo',
        call: async function (params: any = {}) {
            return await http.delete(this.url, params)
        }
    },

}